import axios from "axios";
export default {
    getForumList(data) {
        return axios.post("/forum/list", data)
    },
    getCategories() {
        return axios.get("/forum/categories")
    }
    , getForumInfo(id) {
        return axios.get(`/forum/${id}`)
    },
    getHot() {
        return axios.post("/forum/hot");
    },
    createForum(data) {
        return axios.post('/forum/create',data)
    },
    follow(id) {
        return axios.post(`/forumFollowing/follow/${id}`)
    },
    unfollow(id) {
        return axios.delete(`/forumFollowing/follow/${id}`)
    },
    getFollowingList(data) {
        return axios.post("/forumFollowing/getFollowingForums",null, {
            params:data
        })
    }
    ,
    getTodayStatistics(id) {
        return axios.get(`/forum/statistics/${id}`)
    },
    getWeekStatistics(id) {
        return axios.get(`/forum/statistics/${id}/week`)
    },
    save(data) {
        return axios.put('/forum/save',data, {
            headers: {'Content-Type':'application/x-www-form-urlencoded'},
        })
    }
}